﻿using System;
using System.Collections.Generic;
using ExpenseSystem.Common.BaseModel;


namespace ExpenseSystem.Model
{
    [TableName("SAM_ORDER")]
    public class OrderModel : NormalModel
    {
        private long _ordertype;
        private string _ordercode;
        private long _salesid;
        private string _salesdate;
        private long _customerid;
        private string _customername;
        private string _tel;
        private string _deliveryaddress;
        private string _note;
        private long _salespointid;
        private long _departmentid;
        private int _status;
        private decimal _orderdiscount;
        private decimal _total;
        private decimal _receipt;
        private decimal _salesbonuspaid;
        private decimal _designerbonuspaid;
        private decimal _servicebonuspaid;
        private long _designerid;
        private long _secdesignerid;
        private string _currency;
        private decimal _customersource;
        private long _secsalesid;
        private string _deliverydate;
        public virtual decimal CustomerSource
        {
            get { return _customersource; }
            set
            {
                if (_customersource == value)
                    return;
                _customersource = value;
                if (!PropertyUpdated.Contains("CustomerSource"))
                    PropertyUpdated.Add("CustomerSource");
            }
        }
        public virtual long DesignerId
        {
            get { return _designerid; }
            set
            {
                if (_designerid == value)
                    return;
                _designerid = value;
                if (!PropertyUpdated.Contains("DesignerId"))
                    PropertyUpdated.Add("DesignerId");
            }
        }
        public virtual long SecDesignerId
        {
            get { return _secdesignerid; }
            set
            {
                if (_secdesignerid == value)
                    return;
                _secdesignerid = value;
                if (!PropertyUpdated.Contains("SecDesignerId"))
                    PropertyUpdated.Add("SecDesignerId");
            }
        }
        [Export("订单折扣")]
        public virtual decimal OrderDiscount
        {
            get { return _orderdiscount; }
            set
            {
                if (_orderdiscount == value)
                    return;
                _orderdiscount = value;
                if (!PropertyUpdated.Contains("OrderDiscount"))
                    PropertyUpdated.Add("OrderDiscount");
            }
        }
        public virtual long OrderType
        {
            get { return _ordertype; }
            set
            {
                if (_ordertype == value)
                    return;
                _ordertype = value;
                if (!PropertyUpdated.Contains("OrderType"))
                    PropertyUpdated.Add("OrderType");
            }
        }
        [Export("订单编号")]
        public virtual string OrderCode
        {
            get { return _ordercode; }
            set
            {
                if (_ordercode == value)
                    return;
                _ordercode = value;
                if (!PropertyUpdated.Contains("OrderCode"))
                    PropertyUpdated.Add("OrderCode");
            }
        }
        [Export("销售日期")]
        public virtual string SalesDate
        {
            get { return _salesdate; }
            set
            {
                if (_salesdate == value)
                    return;
                _salesdate = value;
                if (!PropertyUpdated.Contains("SalesDate"))
                    PropertyUpdated.Add("SalesDate");
            }
        }
        [Export("客户名称")]
        public virtual string CustomerName
        {
            get { return _customername; }
            set
            {
                if (_customername == value)
                    return;
                _customername = value;
                if (!PropertyUpdated.Contains("CustomerName"))
                    PropertyUpdated.Add("CustomerName");
            }
        }
        [Export("联系电话")]
        public virtual string Tel
        {
            get { return _tel; }
            set
            {
                if (_tel == value)
                    return;
                _tel = value;
                if (!PropertyUpdated.Contains("Tel"))
                    PropertyUpdated.Add("Tel");
            }
        }
        [Export("送货地址")]
        public virtual string DeliveryAddress
        {
            get { return _deliveryaddress; }
            set
            {
                if (_deliveryaddress == value)
                    return;
                _deliveryaddress = value;
                if (!PropertyUpdated.Contains("DeliveryAddress"))
                    PropertyUpdated.Add("DeliveryAddress");
            }
        }
        [Export("DeliveryDate")]
        public virtual string DeliveryDate
        {
            get { return _deliverydate; }
            set
            {
                if (_deliverydate == value)
                    return;
                _deliverydate = value;
                if (!PropertyUpdated.Contains("DeliveryDate"))
                    PropertyUpdated.Add("DeliveryDate");
            }
        }
        [Export("备注")]
        public virtual string Note
        {
            get { return _note; }
            set
            {
                if (_note == value)
                    return;
                _note = value;
                if (!PropertyUpdated.Contains("Note"))
                    PropertyUpdated.Add("Note");
            }
        }
        public virtual string Currency
        {
            get { return _currency; }
            set
            {
                if (_currency == value)
                    return;
                _currency = value;
                if (!PropertyUpdated.Contains("Currency"))
                    PropertyUpdated.Add("Currency");
            }
        }
        public virtual long SalesId
        {
            get { return _salesid; }
            set
            {
                if (_salesid == value)
                    return;
                _salesid = value;
                if (!PropertyUpdated.Contains("SalesId"))
                    PropertyUpdated.Add("SalesId");
            }
        }
        public virtual long CustomerId
        {
            get { return _customerid; }
            set
            {
                if (_customerid == value)
                    return;
                _customerid = value;
                if (!PropertyUpdated.Contains("CustomerId"))
                    PropertyUpdated.Add("CustomerId");
            }
        }
        public virtual long SalesPointId
        {
            get { return _salespointid; }
            set
            {
                if (_salespointid == value)
                    return;
                _salespointid = value;
                if (!PropertyUpdated.Contains("SalesPointId"))
                    PropertyUpdated.Add("SalesPointId");
            }
        }
        public virtual long DepartmentId
        {
            get { return _departmentid; }
            set
            {
                if (_departmentid == value)
                    return;
                _departmentid = value;
                if (!PropertyUpdated.Contains("DepartmentId"))
                    PropertyUpdated.Add("DepartmentId");
            }
        }
        public virtual int Status
        {
            get { return _status; }
            set
            {
                if (_status == value)
                    return;
                _status = value;
                if (!PropertyUpdated.Contains("Status"))
                    PropertyUpdated.Add("Status");
            }
        }

        public virtual long SecSalesId
        {
            get { return _secsalesid; }
            set
            {
                if (_secsalesid == value)
                    return;
                _secsalesid = value;
                if (!PropertyUpdated.Contains("SecSalesId"))
                    PropertyUpdated.Add("SecSalesId");
            }
        }

        [Export("订单总额")]
        public virtual decimal Total
        {
            get { return _total; }
            set
            {
                if (_total == value)
                    return;
                _total = value;
                if (!PropertyUpdated.Contains("Total"))
                    PropertyUpdated.Add("Total");
            }
        }
        [Export("已收款")]
        public virtual decimal Receipt
        {
            get { return _receipt; }
            set
            {
                if (_receipt == value)
                    return;
                _receipt = value;
                if (!PropertyUpdated.Contains("Receipt"))
                    PropertyUpdated.Add("Receipt");
            }
        }
        [Export("已付销售计提")]
        public virtual decimal SalesBonusPaid
        {
            get { return _salesbonuspaid; }
            set
            {
                if (_salesbonuspaid == value)
                    return;
                _salesbonuspaid = value;
                if (!PropertyUpdated.Contains("SalesBonusPaid"))
                    PropertyUpdated.Add("SalesBonusPaid");
            }
        }
        [Export("已付设计计提")]
        public virtual decimal DesignerBonusPaid
        {
            get { return _designerbonuspaid; }
            set
            {
                if (_designerbonuspaid == value)
                    return;
                _designerbonuspaid = value;
                if (!PropertyUpdated.Contains("DesignerBonusPaid"))
                    PropertyUpdated.Add("DesignerBonusPaid");
            }
        }
        [Export("已付安装计提")]
        public virtual decimal ServiceBonusPaid
        {
            get { return _servicebonuspaid; }
            set
            {
                if (_servicebonuspaid == value)
                    return;
                _servicebonuspaid = value;
                if (!PropertyUpdated.Contains("ServiceBonusPaid"))
                    PropertyUpdated.Add("ServiceBonusPaid");
            }
        }
    }
}
